CreateLinkSpec
TheCreateLinkSpec
method creates a link-specification object for the specified part.
ODLinkSpec CreateLinkSpec (in ODPart part, in ODByteArray data);
part
- A reference to the source part creating the link specification, or
kODNULL
to create an empty link specification.data
- A byte array whose buffer contains arbitrary data to be placed in the link specification, or
kODNULL
to create an empty link specification.- return value
- A reference to the newly created link-specification object.
DISCUSSION
For a link to be created, this method must be called by both the source part and the destination part of a data transfer operation.
The calling part should delete the link-specification object when it has finished using it.
- A source part that supports linking calls this method to create a link-specification object. The
part
parameter is a reference to the source part. The buffer of thedata
parameter can contain any data that the source part'sCreateLink
method may need for creating the specified link.- The user who pastes or drops the source data to a destination part can request a link by means of the Paste As dialog box. When this happens, the destination part calls this method to create an empty link-specification object. The
part
anddata
parameters are both null. The destination part then calls theReadLinkSpec
method of the returned link-specification object to read the link-specification data. The destination part creates the link by passing the link-specification object to its draft'sAcquireLink
method.
If this method executes successfully, it marks this draft as dirty.
SEE ALSO
TheODByteArray
type (page 877).
TheODDraft::AcquireLink
method (page 154).
TheODLinkSpec::ReadLinkSpec
method (page 392).
TheODLinkSpec::WriteLinkSpec
method (page 393).
TheODPart::CreateLink
method (page 492).
TheODLink
class (page 348).
TheODLinkSpec
class (page 390).
"Link Specification" on page 317 in OpenDoc Programmer's Guide.
"Creating a Link at the Destination" on page 384 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help